When a customer (typically, an integrator or a distributor or channel partner) needs to customize its identifier in an electronic device, normally, the identifier is written into a non-volatile memory of the electronic device by a manufacturer before the electronic device leaves factory. The memory can keep data from loss even if powered off. Though the demand from the customer is satisfied in this way, some troubles are inevitably brought to the manufacturer. Because the manufacturer has to serve a number of customers and for each of the customers a product line has to be provided so as to support the customization, which results in increasing the management cost and the stock. Moreover, the situation may happen in which the identifier is customized in error.
A further method for customizing customer identifier is that the customer itself may write the identifier into the electronic device. That is, the customer may directly write the identifier into the non-volatile memory of the electronic device through an application interface of the electronic device provided by the manufacturer, which is an interface between application software and the electronic device. With this method, the information that the user could read is completely the same as the information that the user has written. As a result, this may have the tendency to influence the security of the information customized by the customer, and lead to counterfeit or piracy of the identifier among different customers. For example, a customer A might obtain the identifier of another customer B and write it to the “empty” electronic device ordered from the manufacturer to counterfeit the device.
Generally, the algorithms used to encrypt data are divided into two types: one-way and two-way.
The one-way algorithm, also known as the Hash algorithm, is an algorithm that the original information cannot be reversely deduced even if the result and the algorithm itself are known. Frequently used one-way algorithms are MD5, SHA-1, and RIPEMD Series etc. The Hash function could produce a fixed length of output for various lengths of inputs (namely seeds). The fixed length of output is referred to as the hash or message digest of the inputs.
For a secure Hash function H, the following requirements must be satisfied:
1) H can be applied to various sizes of data;
2) H can produce fixed size of output;
3) For any given input x, the computation of H(x) is relatively simple and fast;
4) For any given code h, it is impossible to find x such that H(x)=h;
5) For any given input x, it is impossible to find y that does not equal to x such that H(x)=H(y).
The two-way algorithm is an algorithm capable of encryption/decryption which can be used to encrypt the plain text into the cipher text, or decrypt the cipher text into the plain text. Some two-way algorithms employ asymmetric key infrastructure, i.e. the key used for encrypting and that for decrypting are different. These two keys depend on each other. That is, the information resulting from encryption using anyone of the keys can only be decrypted using another key.